import React from 'react'
import { Button, Switch } from 'antd';

class NewBtn extends React.Component {
    state = {
        size: 'large'
    }
    onChange(checked) {
        console.log(`switch to ${checked}`);
    }
    render() {
        const { size } = this.state;
        return (
            <div className="btn">
                <h1>我是Button</h1>
                <Button type="primary" size={size}>Primary</Button>
                <Button>Default</Button>
                <Button type="dashed">Dashed</Button>
                <Button type="link">Link</Button>
                <Switch defaultChecked onChange={this.onChange} />
            </div>
        );
    }
}
export default NewBtn
